<%@page language="java" contentType="text/html; charset=utf-8"%>
	
<s:if test="tbList!=null && tbList.size()>0">
 
	<div id="emptyPara" style="height:30px;"></div>
	
	<table border="0" cellspacing="1" cellpadding="0" width="65%" >
	<s:if test="flag==1">
		<tr>
			<td class="tdLabel"><label class="label"><b>初始信息:</b></label></td>
		 	<s:iterator value="tbList" id="ind" status="index">
				<s:if test="tbflag==1">
					<td><input type="button" style="width:55px;" onclick="goto('${tburl}','${patientid}',1);" value="${tbname}"/></td>
				</s:if>
			</s:iterator>	
		</tr>
	</s:if>
	<s:else>
		<tr>
			<td class="tdLabel"><label class="label"><b>初始信息:</b></label></td>
			<s:set name="counta" value="0"></s:set>
		 	<s:iterator value="tbList" id="ind" status="index">	 	
				<s:if test="tbflag==2">
					<s:set name="counta" value="#counta+1"></s:set>		 
					<td>
					<s:if test="exist==false">
					<input type="button"  style="width:55px;" onclick="goto('${tburl}','${patientid}',0);" value="${tbname}"/>
					</s:if>
					<s:else>
					<input type="button"  style="width:55px;color: red;" onclick="goto('${tburl}','${patientid}',0);" value="${tbname}"/>
					</s:else>
					</td>
				  <s:if test="#counta%4==0"><tr><td></td></s:if>
				</s:if>
			</s:iterator>	
		</tr>
		
		<tr height="10"></tr>	
		<tr>
			<td class="tdLabel"><label class="label"><b>治疗信息:</b></label></td>
		 	<s:iterator value="tbList" id="ind" status="index">
				<s:if test="tbflag==3">
					<td>
					<s:if test="exist==false">
					<input type="button"  style="width:55px;" onclick="goto('${tburl}','${patientid}',0);" value="${tbname}"/>
					</s:if>
					<s:else>
					<input type="button"  style="width:55px;color: red;" onclick="goto('${tburl}','${patientid}',0);" value="${tbname}"/>
					</s:else>
					</td>
				</s:if>
			</s:iterator>	
		</tr>
		
		<tr height="10"></tr>
		<tr>
			<td class="tdLabel"><label class="label"><b>随访信息:</b></label></td>
			<s:set name="countb" value="0"></s:set>
		 	<s:iterator value="tbList" id="ind" status="index">
				<s:if test="tbflag==4">
					<s:set name="countb" value="#countb+1"></s:set>
					<td>
					<s:if test="exist==false">
					<input type="button"  style="width:55px;" onclick="goto('${tburl}','${patientid}',0);" value="${tbname}"/>
					</s:if>
					<s:else>
					<input type="button"  style="width:55px;color: red;" onclick="goto('${tburl}','${patientid}',0);" value="${tbname}"/>
					</s:else>
					</td>
					<s:if test="#countb%4==0"><tr><td></td></s:if>
				</s:if>
			</s:iterator>	
		</tr>
	</s:else>
	</table> 	
	
</s:if>

<script>
function goto(tburl,id,flag){
	location.href = "${contextPath}" + tburl + "&patientid="+id+"&flag="+flag;
}
</script>